ヘッダーをスキップ
Oracle TimesTen In-Memory Database C開発者およびリファレンス・ガイド
リリース7.0
E05164-02
  目次へ
目次
索引へ
索引

前へ
前へ
次へ
次へ
 

データ・ストア間での更新のレプリケート

レプリケートを開始する準備の完了後、ttXlaNextUpdateまたはttXlaNextUpdateWait関数を使用してマスター・データ・ストアから更新レコードを取得し、ttXlaApply関数を使用してサブスクライバ・データ・ストアにレコードを書き込みます。

次に例を示します。

int j;

SQLSMALLINT cbConnStrOut;

int records;

ttXlaUpdateDesc_t ** arry;

do {

    /* get up to 15 updates */

    rc = ttXlaNextUpdate(xla_handle,&arry,15,&records);

    if (rc != SQL_SUCCESS) {

      /* 「XLAエラーの処理」を参照*/

    }

    /* print number of updates returned */

    printf("Records returned by ttXlaNextUpdate : %d\n",records);

    /* apply the received updates */  

    for (j=0; j < records; j++) {

      ttXlaUpdateDesc_t *p;

      p = arry[j];

      rc = ttXlaClose(xla_handle);

      if (rc != SQL_SUCCESS){

     /* 「XLAエラーの処理」 および */

     /* 「タイムアウトおよびデッドロックのエラーの処理」 を参照 */

      }

    }

    /* print number of updates applied */

    printf("Records applied successfully : %d\n",records);

} while (records != 0);